package com.ctms.system.service.impl;

import com.ctms.system.dao.TaskReleaseMapper;
import com.ctms.system.domain.CommitTaskDO;
import com.ctms.system.domain.CourseDO;
import com.ctms.system.domain.ShipinDO;
import com.ctms.system.domain.TaskReleaseDO;
import com.ctms.system.service.TaskReleaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class TaskReleaseServiceImpl implements TaskReleaseService {

    @Autowired
    TaskReleaseMapper taskReleaseMapper;

    @Override
    public List<TaskReleaseDO> selectAllTask(Map<String, Object> param) {
        return taskReleaseMapper.selectAllTask(param);
    }

    @Override
    public int count(Map<String, Object> param) {
        return taskReleaseMapper.count(param);
    }

    @Override
    public int insertTask(TaskReleaseDO taskReleaseDO) {
        return taskReleaseMapper.insertTask(taskReleaseDO);
    }

    @Override
    public List<CourseDO> getAllCourse(Integer userId) {
        return taskReleaseMapper.getAllCourse(userId);
    }

    @Override
    public String getCourseNameById(Integer cid) {
        return taskReleaseMapper.getCourseNameById(cid);
    }

    @Override
    public TaskReleaseDO selectTaskByTid(Integer tid) {
        return taskReleaseMapper.selectTaskByTid(tid);
    }

    @Override
    public int updateTask(TaskReleaseDO taskReleaseDO) {
        return taskReleaseMapper.updateTask(taskReleaseDO);
    }

    @Override
    public int deleteTask(Integer tid) {
        return taskReleaseMapper.deleteTask(tid);
    }

    @Override
    public int selectMaxTid() {
        return taskReleaseMapper.selectMaxTid();
    }

    @Override
    public int updateFileName(TaskReleaseDO taskReleaseDO) {
        return taskReleaseMapper.updateFileName(taskReleaseDO);
    }

    @Override
    public ShipinDO selectFileByName(String name) {
        return taskReleaseMapper.selectFileByName(name);
    }


    @Override
    public List<TaskReleaseDO> selectAllToDoTask(Map<String, Object> param) {
        return taskReleaseMapper.selectAllToDoTask(param);
    }

    @Override
    public int toDoCount(Map<String, Object> param) {
        return taskReleaseMapper.toDoCount(param);
    }

    @Override
    public int commitTask(CommitTaskDO commitTaskDO) {
        return taskReleaseMapper.commitTask(commitTaskDO);
    }

    @Override
    public int selectMaxCommit() {
        return taskReleaseMapper.selectMaxCommit();
    }

    @Override
    public CommitTaskDO selectCommitFileById(Integer id) {
        return taskReleaseMapper.selectCommitFileById(id);
    }

    @Override
    public int updateCommitFile(CommitTaskDO commitTaskDO) {
        return taskReleaseMapper.updateCommitFile(commitTaskDO);
    }

    @Override
    public int commitCount(Integer tid, Integer userId) {
        return taskReleaseMapper.commitCount(tid,userId);
    }

    @Override
    public int updateCommit(CommitTaskDO commitTaskDO) {
        return taskReleaseMapper.updateCommit(commitTaskDO);
    }

    @Override
    public CommitTaskDO selectByTidUserId(Integer tid, Integer userId) {
        return taskReleaseMapper.selectByTidUserId(tid, userId);
    }

    @Override
    public List<CommitTaskDO> selectCommitByUserId(Integer userId) {
        return taskReleaseMapper.selectCommitByUserId(userId);
    }

    @Override
    public List<TaskReleaseDO> selectAllCommitTask(Map<String, Object> param) {
        return taskReleaseMapper.selectAllCommitTask(param);
    }

    @Override
    public int studentCommitCount(Map<String, Object> param) {
        return taskReleaseMapper.studentCommitCount(param);
    }

    @Override
    public int totalCommit(Integer tid) {
        return taskReleaseMapper.totalCommit(tid);
    }

    @Override
    public List<CommitTaskDO> selectCommitByTid(Integer tid) {
        return taskReleaseMapper.selectCommitByTid(tid);
    }

    @Override
    public List<TaskReleaseDO> selectAllTaskByCourseName(String courseName) {
        return taskReleaseMapper.selectAllTaskByCourseName(courseName);
    }
}
